package cn.monkey.family.data.sys.address;

import com.google.common.base.Function;
import jakarta.servlet.http.HttpServletRequest;

public interface AddressQueryRequests {
    static AddressQueryRequest fromHttpServletRequest(HttpServletRequest servletRequest) {
        Function<String, String> paramResolveFunction = servletRequest::getParameter;
        return AddressQueryRequest.builder()
                .name(paramResolveFunction.apply("name"))
                .code(paramResolveFunction.apply("code"))
                .build();
    }
}
